﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Text;
using TL_Cloud.Models.BookShop;

namespace TL_Cloud.ViewModels.BookShop.BKTypeInfo
{
    /// <summary>
    /// 图书类型资源
    /// </summary>
    public class BKTypeInfoResource : BKTypeUpdateResource
    {
        public string BktypeId { get; set; }
    }
    /// <summary>
    /// 图书类型基础资源
    /// </summary>
    public class BKTypeBasicResource
    {
        public string BktypeName { get; set; }
        public int? Sort { get; set; }
        public string Remark { get; set; }
    }
    /// <summary>
    /// 图书类型更新资源
    /// </summary>
    public class BKTypeUpdateResource : BKTypeBasicResource
    {
        public int? EnabledMark { get; set; }
    }

    public class BKTypeMappingMappingProfile : Profile
    {
        public BKTypeMappingMappingProfile()
        {
            CreateMap<BKTypeInfoResource, Bk_TypeInfo>();
            CreateMap<Bk_TypeInfo, BKTypeInfoResource>();
            CreateMap<BKTypeBasicResource, Bk_TypeInfo>();
            CreateMap<BKTypeUpdateResource, Bk_TypeInfo>();
        }

    }
}
